﻿<UserControl x:Class="EmailClient.UserControls.AccountsList"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Menu Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3">
            <MenuItem x:Name="miCreate" Header="{DynamicResource NameButtonCreate}" Click="AddAccount_Click"/>
            <MenuItem x:Name="miEdit" Header="{DynamicResource NameButtonEdit}" Click="EditAccount_Click"/>
            <MenuItem x:Name="miDel" Header="{DynamicResource NameButtonDelete}" Click="DelAccount_Click"/>
        </Menu>
        <DataGrid Name="dgAccounts" ItemsSource="{Binding}" GridLinesVisibility="Horizontal" AutoGenerateColumns="False" MouseDoubleClick="dgAccounts_MouseDoubleClick" SelectionMode="Single" BorderThickness="1" Margin="2,30,2,2" IsReadOnly="True">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Email" Binding="{Binding Email}" />
                <DataGridTextColumn Header="{DynamicResource UserContAccountsListNameColumn}" Binding="{Binding Name}" />
                <DataGridTextColumn Header="{DynamicResource UserContAccountsListTypeColumn}" Binding="{Binding MailType}" />
                <DataGridCheckBoxColumn Header="{DynamicResource UserContAccountsListUseSSLColumn}" Binding="{Binding UseSSL}" />
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</UserControl>
